import Https from "@/utils/Https2";

export const queryPageDataReq = async (params) =>
  await Https.get("/system/role/list", params);

export const queryMenuPageDataReq = async (params) =>
  await Https.get("/system/menu/loadTenantPackageMenuTreeselect", {});

export const addItemReq = async (params) =>
  await Https.post("/system/role", params, true);

export const updateItemReq = async (params) =>
  await Https.put("/system/role", params, true);
export const deleteItemReq = async (params) =>
  await Https.delete(`/system/role/${params}`, {});

export const deleteAuthUserItemReq = async (params) =>
  await Https.put("/system/role/authUser/cancel", params, true);

export const queryAuthUserPageDataReq = async (params) =>
  await Https.get("/system/role/authUser/allocatedList", params);

export const toggleStateReq = async (params) =>
  await Https.put("/system/role/changeStatus", params, true);

export const queryRoleMenuPageDataReq = async (params) =>
  await Https.get(`/system/menu/roleMenuTreeselect/${params}`, {});
